<?php

namespace frontend\modules\commission\controllers;

use Yii;
use frontend\modules\commission\components\Controller;
use common\logics\MapFenceLogic;

/**
 * DefaultController
 *
 * @author emhome<emhome@163.com>
 * @since 2.0
 */
class DefaultController extends Controller {

    /**
     * Renders the index view for the module
     * @return string
     */
    public function actionIndex() {

        
        return $this->member;
        return MemberSearch::current();
        //用户信息
        $identity = $this->user;
        //会员信息
        return $member = $identity->member;
        //账户信息
        $account = $member->account;
        //等级信息
        $level = $member->level;
        //上线信息
        $upper = [
            'username' => '系统'
        ];
        if ($identity->branch && $identity->branch->upper) {
            $master = $identity->branch->upper;
            if ($master->user) {
                $upper['username'] = $master->user->username;
            }
            if ($master->type) {
                $upper['level'] = $master->type->name;
            }
        }

        return [
            'user' => $identity,
            'member' => $this->member,
            'level' => $level,
            'upper' => $upper,
            'menus' => $menus,
        ];
    }

}
